from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from cemberus.projects.models import Project


class ProjectAdmin(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('name',)}
    fieldsets = [
        (None, {'fields': ['user', 'category',]}),
        (_(u'Projekteigenschaften'), {'fields': ['name', 'slug', 'description', 'image', 'homepage', 'email', 'created', 'modified', 'status',]}),
        (_(u'HTML-Meta Angaben'), {'fields': ['html_title', 'html_description', 'html_keywords',]}),
    ]
    list_display = ('name', 'user', 'homepage', 'created',)
    search_fields = ['name', 'user',]
    list_filter = ('user',)
    
admin.site.register(Project, ProjectAdmin)

